<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>选择客户</title>
		<meta name="viewport" content="width=device-width,height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="renderer" content="webkit" />
		<meta name="aplus-xplug" content="NONE">
		<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="/static/iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="/static/layui/css/modules/admin/default/admin.css" />
		<link rel="stylesheet" type="text/css" href="/static/css/new_layui.css" />
		<link rel="stylesheet" type="text/css" href="/static/css/default.css" />
		<script type="text/javascript" charset="utf-8" src="/static/layui/layui.js"></script>
		<script type="text/javascript" charset="utf-8" src="/static/js/index.js"></script>
		<style>
			html,body{
				height: 100%;
				overflow: hidden;
			}
			.layui-card-body{
				display: flex;
				cursor: pointer;
			}
			.layui-card-body img{
				width: 45px;
				height: 45px;
				border-radius: 50%;
				margin-right: 10px;
			}
			.layui-card-body div.right-box{
				line-height: 20px;
				transition: all .3s;
				color: #666666;
				width: 70%;
				overflow: hidden;
			}
			.layui-card{
				transition: all .3s;
			}
			.layui-card.on,.layui-card.active{
				box-shadow: 0 4px 3px 0 rgba(243, 0, 0, 0.5);
			}
			.layui-card.on div.right-box,.layui-card.active div.right-box{
				color: #FF6600;
				
			}
			.right-add{
				position: absolute;
				right: 5px;
				top: 20px;
			}
			.right-add span{
				transition: all .3s;
				font-size: 30px;
				color: #FFFFFF;
			}
			.layui-card.on .right-add span,.layui-card.active .right-add span{
				color: #FF6600;
			}
			.page-left{
				margin: 30px 20px;
				width: 300px;
			}
			.page-left .view-info-box{
				width: 300px;
				height: calc(100% - 80px);
				overflow:auto;
			}
			.search_form{
				padding: 0px;
			}
			.page-right{
				width: calc(100% - 380px);
				margin:30px 20px
			}
			.layui-elem-field.on{
				background: #F2F2F2;
			}
			.member-shopping-list{
				overflow-x: auto;
				width: 100%;
				height: 80px;
			}
			.layui-elem-quote{
				padding: 10px 15px;
				margin-bottom: 0px;
			}
			.layui-elem-quote.red:first-child{
				border-left-color: #ff6600;
			}
			.pull-right{
				float: right;
			}
			.layui-col-md10 .set-left,.layui-col-md10 .set-right{
				background-color:#FBFBFB;
				border:1px solid #e6e6e6;
			}
			@media screen and (min-width: 1200px){
				.member-shopping-list .layui-col-lg2 {
					width: 20%!important;
				}
			}
			input[name="invoice_money"]{
				border:0;
				color: #FF6600;
				font-size: 18px;
			}
			.invoice-box{
				display: none;
			}
		</style>
	</head>

	<body class="default" style="display: flex;">
		<div class="layui-form-item" id="invoice_info" style="display: none; padding: 20px;" >
			<form class="layui-form" lay-filter="tpl_add_invoice_info" action="{:url('Invoice/saveInvoice')}">
				<input type="hidden" name="member_id" />
				<input type="hidden" name="order_nos" />
				<div class="layui-form-item">
					<label class="layui-form-label">开票金额</label>
					<div class="layui-input-inline">
						<input name="invoice_money" readonly="" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">开票方式</label>
					<div class="layui-input-inline">
						<input type="radio" name="builder_type" lay-filter="builder_type" checked="" value="1" title="纸质发票">
				 		<input type="radio" name="builder_type" lay-filter="builder_type" value="2" title="电子发票">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">发票类型</label>
					<div class="layui-input-inline">
						<input type="radio" name="invoice_type" lay-filter="invoice_type" value="1" title="普通发票">
						<input type="radio" name="invoice_type" lay-filter="invoice_type" checked="" value="3" title="增值税发票">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">发票抬头</label>
					<div class="layui-input-inline">
						<input name="invoice_title" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">税号</label>
					<div class="layui-input-inline">
						<input name="invoice_duty"  lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item invoice_type3">
					<label class="layui-form-label">地址</label>
					<div class="layui-input-inline">
						<input name="invoice_addr" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item invoice_type3">
					<label class="layui-form-label">电话</label>
					<div class="layui-input-inline">
						<input name="invoice_tel" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item invoice_type3">
					<label class="layui-form-label">开户银行</label>
					<div class="layui-input-inline">
						<input name="invoice_bank" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item invoice_type3">
					<label class="layui-form-label">开户账号</label>
					<div class="layui-input-inline">
						<input name="invoice_account" lay-verify="required" type="text" class="layui-input" />
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-inline">
						<button type="button" lay-submit lay-filter="submit_invoice" id="btn-invoice" class="layui-btn layui-btn-normal">申请开票</button>
					</div>
				</div>
			</form>
		</div>
		<div class="page-left">
			<div class="search-box">
				<form class="search_form layui-form" lay-filter="customer_search_form" action="">
					<div class="layui-inline">
						<label class="layui-form-label">联系人搜索</label>
						<div class="layui-input-inline">
							<input type="text" name="contacts" placeholder="联系人" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-input-inline">
							<input type="text" name="phone" placeholder="联系电话" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="pack-up"></div>
				</form>
			</div>
			<ul class="view-info-box layui-row layui-col-space15" style="margin-top: 20px; padding: 10px; background-color: #F2F2F2;">

			</ul>
		</div>
		<div class="page-right">
			<fieldset class="layui-elem-field same-costom">
				<legend>同账号下的客户信息</legend>
				<ul class="layui-field-box member-shopping-list layui-row layui-col-space15">
					请先选择左侧客户信息
				</ul>
				<div style="clear: both;"></div>
			</fieldset>
			<div class="layui-row layui-col-space15 invoice-box">
				<div class="layui-col-md6 left-box">
					<blockquote class="layui-elem-quote red">
					<span>
					可开票商品
					</span>
					<button class="set-left layui-btn layui-btn-sm layui-btn-primary layui-icon layui-icon-spread-left pull-right" style="margin-top: -4px; margin-left: 10px;"></button>
					<span class="view-left-box layui-inline pull-right" style="margin-top: -8px;">
					<input type="text" name="order_no" placeholder="订单号搜索" class="layui-input" style="width: 200px;" />
					</span>
					
					</blockquote>
					<table class="layui-hide" id="wait_list" lay-filter="wait_list"></table>
				</div>
				<div class="layui-col-md6 right-box">
					<blockquote class="layui-elem-quote">
						<button class="set-right layui-btn layui-btn-sm layui-btn-primary layui-icon layui-icon-shrink-right" style="margin-top: -4px; margin-right: 10px;"></button>
						<span class="view-right-box">开票金额：<font class="all_price">0</font>元</span>
						<button type="button" class="layui-btn layui-btn-normal layui-btn-sm pull-right apply-btn" style="margin-top: -4px;">申请开票</button>
					</blockquote>
					<table class="layui-hide" id="select_list" lay-filter="select_list"></table>
				</div>
			</div>
		</div>
		
		<script>
			var wait_cols = {$wait_cols},
				select_cols ={$select_cols};
			var ajax_customer_url = "{:url('Invoice/ajaxCustomer')}",
				ajax_shopping_url = "{:url('Shopping/ajaxList')}",
				ajax_wait_cart_url = "{:url('Invoice/ajaxWaitCart')}",
				ajax_invoice_save_url = "{:url('Invoice/saveInvoice')}",
				ajax_invoice_find_url = "{:url('Invoice/ajaxFind')}";
		</script>
		<script type="text/html" id="waitToolbar">
			<div class="layui-btn-container">
			<a type="button" data-title="添加商品" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="selectInvoice"><i class="layui-icon layui-icon-add-1"></i>添加商品</a>
			</div>
		</script>
		<script type="text/html" id="selectToolbar">
			<div class="layui-btn-container">
			<a type="button" data-title="移除商品" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeInvoice"><i class="layui-icon layui-icon-close"></i>移除商品</a>
			</div>
		</script>
		<script type="text/html" id="wait_tool">
			<div class="layui-btn-group">
				<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="select"><i class="layui-icon layui-icon-add-1"></i></a>
			</div>
		</script>
		<script type="text/html" id="select_tool">
			<div class="layui-btn-group">
				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove"><i class="layui-icon layui-icon-close"></i></a>
			</div>
		</script>
		<script src="/static/js/invoice/customer.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
